using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class But_1_Text : MonoBehaviour
{
    public Button Button;
    [SerializeField]
    private string key = "startgame";
    public void Start()
    {
        Button.onClick.AddListener(onClick);
        //绑定事件
        EventManager.Ins.AttachEvent(key, startGameEventHandle);
    }
    private void onClick()
    {
        EventManager.Ins.TriggerEvent(key);
    }
    /// <summary>
    /// 按下事件
    /// </summary>
    /// <param name="o"></param>
    public void startGameEventHandle(object o = null)
    {
        Debug.Log("UI系统的第一个按钮");
      

    }

}
